package A01File;

import java.io.File;
import java.io.IOException;

public class FileTest01 {
    public static void main(String[] args) throws IOException {
        File file1 = new File("..\\a");
        file1.mkdirs();
        File file2 = new File(file1,"a.txt");

        boolean b = file2.createNewFile();
        if(b){
            System.out.println("创建成功");
        }else {
            System.out.println("创建失败");
        }
    }
}
